{% load static %}

{% include 'common/header.html' %}


<div class="container" style="padding-top:20px;">

<div class=""  style="margin:15px 0">


       <form class=" navbar-form" action="/search" method="get" style="margin-top:0;box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);border:1px solid #ACC0E1;border-radius: 30px;">

                       <div class="flex "  style="">
                            <div  class="flex-1" style="position: relative;border-radius: 4px; ">
                                <input type="hidden" name="type" value="extension">
                                <input type="text" class="form-control" style="width:100%;height:28px;border:0;box-shadow:8px;
                                border:0;border-radius: 30px;
                                border-top-right-radius: 0;border-bottom-right-radius: 0;" name="keyword" v-model="keyword"
                                 placeholder="Search …" autocomplete="off" aria-label="Search box">

                                </div>

                                <button   @click="submit()" type="button" class="searchbtn "
                                style="background:#ffffff;
                                background-repeat: no-repeat; background-size: 60%;
                                background-position: 30% 50%;
                                 display:block; width: 30px;height:28px;box-shadow:none;border:0;
                                 border-radius: 30px;border-top-left-radius: 0;border-bottom-left-radius: 0;">
                                </button>
                        </div>
   </form>
</div>

</div>

<div class="container">



<div class="flex f-j-start  align-left" style="color:#ff0000;font-size:16px;margin-bottom: 10px; ">Top 5 structural similar compound</div>


  {% for item in download_list %}


<div class="compound-info">
    <div class="compound-header">
        <h2></h2>
    </div>

    <div class="compound-details">
        <div class="compound-image">
            <!-- 化合物结构图的占位符 -->
            <a href="/detail?id={{item.id}}" style=" color:#ff0000;text-decoration: underline">
            <div class="structure-placeholder"></div>
             </a>
        </div>

        <div class="compound-data">
             <div class="data-row">
                 <a href="/detail?id={{item.id}}" style="">
                <span class=" title text-ellipsis-line2"  style=" ">Methylnereistoxin, 1,2-Dithiolan-4-yltrimethylammonium iodide; Nereistoxin methiodide; 19216-75-2; N,N-Dimethyl-1,2-dithiolan-4-amine methiodide</span>
                     </a>
            </div>
            <div class="data-row">
                <span class="label text-bold ">EMNPD ID:</span>
                <span class="value"><a href="/detail?id={{item.id}}" style=" color:#ff0000;text-decoration: underline">EMNPD11</a></span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">Compound CID:</span>
                <span class="value"><a href="{{item.link}}" style=" color:#ff0000;text-decoration: underline">360182</a></span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">MF:</span>
                <span class="value">C<sub>5</sub>H<sub>14</sub>NS<sub>2</sub></span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">MW:</span>
                <span class="value">291.2g/mol</span>
            </div>

            <div class="data-row">
                <span class="label text-bold " >IUPAC Name:</span>
                <span class="value">N,N-dimethyldithiolan-4-amine</span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">SMILES:</span>
                <span class="value">CN(C)C1CSSC1</span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">InChIKey:</span>
                <span class="value">DSOOGBGKEWZRIH-UHFFFAOYSA-N</span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">InChI:</span>
                <span class="value">InChI=1S/C5H11NS2/c1-6(2)5-3-7-8-4-5/h5H,3-4H2,1-2H3</span>
            </div>

            <div class="data-row">
                <span class="label text-bold ">Similarity:</span>
                <span class="value" style=" color:#ff0000;">27.4%</span>
            </div>
        </div>
    </div>
</div>
 {% endfor %}

<style>
    .label{
        font-size:13px !important;
        color:#000000 !important;
        padding:0 !important;
    }
.compound-info {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin: 20px;
    background-color: #fff;
}

.compound-header h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

.compound-details {
    display: flex;
    gap: 30px;
}

.compound-image {
    flex: 0 0 200px;
}

.structure-placeholder {
    width: 200px;
    height: 200px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
}

.compound-data {
    flex: 1;
}

.data-row {
    {#margin-bottom: 10px;#}
    line-height: 1.5;
}

.label {
    font-weight: bold;
    color: #666;
    margin-right: 10px;
}

.value {
    color: #333;
}
</style>





                            <!-- 分页 -->
                            {% if page_obj.has_other_pages %}
                            <div class="pagination">
                                {% if page_obj.has_previous %}
                                    <a href="?page={{ page_obj.previous_page_number }}">&laquo;</a>
                                {% endif %}

                                {% for i in page_obj.paginator.page_range %}
                                    {% if page_obj.number == i %}
                                        <span class="active">{{ i }}</span>
                                    {% else %}
                                        <a href="?page={{ i }}">{{ i }}</a>
                                    {% endif %}
                                {% endfor %}

                                {% if page_obj.has_next %}
                                    <a href="?page={{ page_obj.next_page_number }}">&raquo;</a>
                                {% endif %}
                            </div>
                            {% endif %}
                            <style>
tbody>tr, tbody>tr a{ color:#ffffff}
tbody>tr:hover, tbody>tr:hover a{color:#000000}
 .table-striped>tbody>tr:nth-of-type(odd), .table-striped>tbody>tr:nth-of-type(odd) a{ background:#f9f9f9;color:#000000}





.pagination {
  display: flex;
  justify-content: center;
  padding-left: 0;
  list-style: none;
  margin: 20px 0;
}

.pagination a,
.pagination span {
  position: relative;
  display: block;
  padding: 8px 16px;
  margin: 0 4px;
  border-radius: 4px;
  color: #1e6887;
  background-color: #fff;
  border: 1px solid #dee2e6;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  color: #fff;
  background-color: #1C2B4B;
  border-color: #1e6887;
  text-decoration: none;
}

.pagination .active {
  color: #fff;
  background-color: #1C2B4B;
  border-color: #1e6887;
}

.pagination .active:hover {
  cursor: default;
}

.pagination a:first-child,
.pagination a:last-child {
  padding: 8px 12px;
}

.pagination a:first-child:hover,
.pagination a:last-child:hover {
  background-color: #1e6887;
  color: #fff;
}
                            </style>


 </div>


{% include 'common/footer.html' %}


